<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>代码生成器配置旧 | liran</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/img/favicon.ico">
    <meta name="description" content="liran note">
    <meta name="keywords" content="我是content">
    <meta name="theme-color" content="#11a8cd">
    <link rel="preload" href="/assets/css/0.styles.0a02024d.css" as="style"><link rel="preload" href="/assets/js/app.3c810432.js" as="script"><link rel="preload" href="/assets/js/2.86379151.js" as="script"><link rel="preload" href="/assets/js/12.4e438e6d.js" as="script"><link rel="prefetch" href="/assets/js/10.52a7ec83.js"><link rel="prefetch" href="/assets/js/11.ef9c9dd5.js"><link rel="prefetch" href="/assets/js/13.962a4298.js"><link rel="prefetch" href="/assets/js/14.cc384da1.js"><link rel="prefetch" href="/assets/js/15.bb801760.js"><link rel="prefetch" href="/assets/js/16.1641b9c9.js"><link rel="prefetch" href="/assets/js/17.0d495285.js"><link rel="prefetch" href="/assets/js/18.8c0ed479.js"><link rel="prefetch" href="/assets/js/19.7294d692.js"><link rel="prefetch" href="/assets/js/20.fd8383bc.js"><link rel="prefetch" href="/assets/js/3.9eb29365.js"><link rel="prefetch" href="/assets/js/4.27f548a3.js"><link rel="prefetch" href="/assets/js/5.735f4bf2.js"><link rel="prefetch" href="/assets/js/6.6918e2a3.js"><link rel="prefetch" href="/assets/js/7.bdd56c44.js"><link rel="prefetch" href="/assets/js/8.a026c9e8.js"><link rel="prefetch" href="/assets/js/9.75871346.js">
    <link rel="stylesheet" href="/assets/css/0.styles.0a02024d.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/img/logo.svg" alt="liran" class="logo"> <span class="site-name can-hide">liran</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="指南" class="dropdown-title"><a href="/pages/24112f/" class="link-title">指南</a> <span class="title" style="display:none;">指南</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/24112f/" class="nav-link">快速入门</a></li><li class="dropdown-item"><!----> <a href="/pages/779a6e/" class="nav-link">核心功能</a></li><li class="dropdown-item"><!----> <a href="/pages/6b03c5/" class="nav-link">扩展</a></li><li class="dropdown-item"><!----> <a href="/pages/2976a3/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="配置" class="dropdown-title"><a href="/pages/56bac0/" class="link-title">配置</a> <span class="title" style="display:none;">配置</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/56bac0/" class="nav-link">使用配置</a></li><li class="dropdown-item"><!----> <a href="/pages/981406/" class="nav-link">代码生成器配置新</a></li><li class="dropdown-item"><!----> <a href="/pages/061573/" aria-current="page" class="nav-link router-link-exact-active router-link-active">代码生成器配置旧</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="liran" class="dropdown-title"><a href="/04.test" class="link-title">liran</a> <span class="title" style="display:none;">liran</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/a7b3a6/" class="nav-link">基础</a></li><li class="dropdown-item"><!----> <a href="/pages/4b3960/" class="nav-link">提升</a></li></ul></div></div><div class="nav-item"><a href="/archives/" class="nav-link">归档</a></div> <a href="https://github.com/baomidou/mybatis-plus" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="指南" class="dropdown-title"><a href="/pages/24112f/" class="link-title">指南</a> <span class="title" style="display:none;">指南</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/24112f/" class="nav-link">快速入门</a></li><li class="dropdown-item"><!----> <a href="/pages/779a6e/" class="nav-link">核心功能</a></li><li class="dropdown-item"><!----> <a href="/pages/6b03c5/" class="nav-link">扩展</a></li><li class="dropdown-item"><!----> <a href="/pages/2976a3/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="配置" class="dropdown-title"><a href="/pages/56bac0/" class="link-title">配置</a> <span class="title" style="display:none;">配置</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/56bac0/" class="nav-link">使用配置</a></li><li class="dropdown-item"><!----> <a href="/pages/981406/" class="nav-link">代码生成器配置新</a></li><li class="dropdown-item"><!----> <a href="/pages/061573/" aria-current="page" class="nav-link router-link-exact-active router-link-active">代码生成器配置旧</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="liran" class="dropdown-title"><a href="/04.test" class="link-title">liran</a> <span class="title" style="display:none;">liran</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/a7b3a6/" class="nav-link">基础</a></li><li class="dropdown-item"><!----> <a href="/pages/4b3960/" class="nav-link">提升</a></li></ul></div></div><div class="nav-item"><a href="/archives/" class="nav-link">归档</a></div> <a href="https://github.com/baomidou/mybatis-plus" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>使用配置</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/56bac0/" class="sidebar-link">使用配置</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>代码生成器配置</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/981406/" class="sidebar-link">代码生成器配置新</a></li><li><a href="/pages/061573/" aria-current="page" class="active sidebar-link">代码生成器配置旧</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#基本配置" class="sidebar-link">基本配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#datasource" class="sidebar-link">dataSource</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#strategy" class="sidebar-link">strategy</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#packageinfo" class="sidebar-link">packageInfo</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#template" class="sidebar-link">template</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#globalconfig" class="sidebar-link">globalConfig</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#injectionconfig" class="sidebar-link">injectionConfig</a></li></ul></li><li class="sidebar-sub-header"><a href="/pages/061573/#数据源-datasourceconfig-配置" class="sidebar-link">数据源 dataSourceConfig 配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#dbquery" class="sidebar-link">dbQuery</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#dbtype" class="sidebar-link">dbType</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#schemaname" class="sidebar-link">schemaName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#typeconvert" class="sidebar-link">typeConvert</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#url" class="sidebar-link">url</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#drivername" class="sidebar-link">driverName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#username" class="sidebar-link">username</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#password" class="sidebar-link">password</a></li></ul></li><li class="sidebar-sub-header"><a href="/pages/061573/#数据库表配置" class="sidebar-link">数据库表配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#iscapitalmode" class="sidebar-link">isCapitalMode</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#skipview" class="sidebar-link">skipView</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#naming" class="sidebar-link">naming</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#columnnaming" class="sidebar-link">columnNaming</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#tableprefix" class="sidebar-link">tablePrefix</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#fieldprefix" class="sidebar-link">fieldPrefix</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#superentityclass" class="sidebar-link">superEntityClass</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#superentitycolumns" class="sidebar-link">superEntityColumns</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#supermapperclass" class="sidebar-link">superMapperClass</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#superserviceclass" class="sidebar-link">superServiceClass</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#superserviceimplclass" class="sidebar-link">superServiceImplClass</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#supercontrollerclass" class="sidebar-link">superControllerClass</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#enablesqlfilter-since-3-3-1" class="sidebar-link">enableSqlFilter（since 3.3.1）</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#include" class="sidebar-link">include</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#liketable" class="sidebar-link">likeTable</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#exclude" class="sidebar-link">exclude</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#notliketable" class="sidebar-link">notLikeTable</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entitycolumnconstant" class="sidebar-link">entityColumnConstant</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entitybuildermodel" class="sidebar-link">~~entityBuilderModel~~</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#chainmodel-since-3-3-2" class="sidebar-link">chainModel（since 3.3.2）</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entitylombokmodel" class="sidebar-link">entityLombokModel</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entitybooleancolumnremoveisprefix" class="sidebar-link">entityBooleanColumnRemoveIsPrefix</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#restcontrollerstyle" class="sidebar-link">restControllerStyle</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#controllermappinghyphenstyle" class="sidebar-link">controllerMappingHyphenStyle</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entitytablefieldannotationenable" class="sidebar-link">entityTableFieldAnnotationEnable</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#versionfieldname" class="sidebar-link">versionFieldName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#logicdeletefieldname" class="sidebar-link">logicDeleteFieldName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#tablefilllist" class="sidebar-link">tableFillList</a></li></ul></li><li class="sidebar-sub-header"><a href="/pages/061573/#包名配置" class="sidebar-link">包名配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#parent" class="sidebar-link">parent</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#modulename" class="sidebar-link">moduleName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entity" class="sidebar-link">entity</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#service" class="sidebar-link">service</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#serviceimpl" class="sidebar-link">serviceImpl</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#mapper" class="sidebar-link">mapper</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#xml" class="sidebar-link">xml</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#controller" class="sidebar-link">controller</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#pathinfo" class="sidebar-link">pathInfo</a></li></ul></li><li class="sidebar-sub-header"><a href="/pages/061573/#模板配置" class="sidebar-link">模板配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#entity-2" class="sidebar-link">entity</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entitykt" class="sidebar-link">entityKt</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#service-2" class="sidebar-link">service</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#serviceimpl-2" class="sidebar-link">serviceImpl</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#mapper-2" class="sidebar-link">mapper</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#xml-2" class="sidebar-link">xml</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#controller-2" class="sidebar-link">controller</a></li></ul></li><li class="sidebar-sub-header"><a href="/pages/061573/#全局策略-globalconfig-配置" class="sidebar-link">全局策略 globalConfig 配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#outputdir" class="sidebar-link">outputDir</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#fileoverride" class="sidebar-link">fileOverride</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#open" class="sidebar-link">open</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#enablecache" class="sidebar-link">enableCache</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#author" class="sidebar-link">author</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#kotlin" class="sidebar-link">kotlin</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#swagger2" class="sidebar-link">swagger2</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#activerecord" class="sidebar-link">activeRecord</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#baseresultmap" class="sidebar-link">baseResultMap</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#basecolumnlist" class="sidebar-link">baseColumnList</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#datetype" class="sidebar-link">dateType</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#entityname" class="sidebar-link">entityName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#mappername" class="sidebar-link">mapperName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#xmlname" class="sidebar-link">xmlName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#servicename" class="sidebar-link">serviceName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#serviceimplname" class="sidebar-link">serviceImplName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#controllername" class="sidebar-link">controllerName</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#idtype" class="sidebar-link">idType</a></li></ul></li><li class="sidebar-sub-header"><a href="/pages/061573/#注入-injectionconfig-配置" class="sidebar-link">注入 injectionConfig 配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/pages/061573/#map" class="sidebar-link">map</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#fileoutconfiglist" class="sidebar-link">fileOutConfigList</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#filecreate" class="sidebar-link">fileCreate</a></li><li class="sidebar-sub-header"><a href="/pages/061573/#initmap" class="sidebar-link">initMap</a></li></ul></li></ul></li></ul></section></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><!----> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-content"></div></div></div> <h1><img src="">
          代码生成器配置旧
        </h1>  <div class="theme-vdoing-content content__default"><h2 id="基本配置"><a href="#基本配置" class="header-anchor">#</a> 基本配置</h2> <h3 id="datasource"><a href="#datasource" class="header-anchor">#</a> dataSource</h3> <ul><li>类型：<code>DataSourceConfig</code></li> <li>默认值：<code>null</code></li></ul> <p>数据源配置，通过该配置，指定需要生成代码的具体数据库，具体请查看 <a href="#%E6%95%B0%E6%8D%AE%E6%BA%90-datasourceconfig-%E9%85%8D%E7%BD%AE">数据源配置</a></p> <h3 id="strategy"><a href="#strategy" class="header-anchor">#</a> strategy</h3> <ul><li>类型：<code>StrategyConfig</code></li> <li>默认值：<code>null</code></li></ul> <p>数据库表配置，通过该配置，可指定需要生成哪些表或者排除哪些表，具体请查看 <a href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E8%A1%A8%E9%85%8D%E7%BD%AE">数据库表配置</a></p> <h3 id="packageinfo"><a href="#packageinfo" class="header-anchor">#</a> packageInfo</h3> <ul><li>类型：<code>PackageConfig</code></li> <li>默认值：<code>null</code></li></ul> <p>包名配置，通过该配置，指定生成代码的包路径，具体请查看 <a href="#%E5%8C%85%E5%90%8D%E9%85%8D%E7%BD%AE">包名配置</a></p> <h3 id="template"><a href="#template" class="header-anchor">#</a> template</h3> <ul><li>类型：<code>TemplateConfig</code></li> <li>默认值：<code>null</code></li></ul> <p>模板配置，可自定义代码生成的模板，实现个性化操作，具体请查看 <a href="#%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE">模板配置</a></p> <h3 id="globalconfig"><a href="#globalconfig" class="header-anchor">#</a> globalConfig</h3> <ul><li>类型：<code>GlobalConfig</code></li> <li>默认值：<code>null</code></li></ul> <p>全局策略配置，具体请查看 <a href="#%E5%85%A8%E5%B1%80%E7%AD%96%E7%95%A5-globalconfig-%E9%85%8D%E7%BD%AE">全局策略配置</a></p> <h3 id="injectionconfig"><a href="#injectionconfig" class="header-anchor">#</a> injectionConfig</h3> <ul><li>类型：<code>InjectionConfig</code></li> <li>默认值：<code>null</code></li></ul> <p>注入配置，通过该配置，可注入自定义参数等操作以实现个性化操作，具体请查看 <a href="#%E6%B3%A8%E5%85%A5-injectionconfig-%E9%85%8D%E7%BD%AE">注入配置</a></p> <h2 id="数据源-datasourceconfig-配置"><a href="#数据源-datasourceconfig-配置" class="header-anchor">#</a> 数据源 <code>dataSourceConfig</code> 配置</h2> <h3 id="dbquery"><a href="#dbquery" class="header-anchor">#</a> dbQuery</h3> <ul><li>数据库信息查询类</li> <li>默认由 <code>dbType</code> 类型决定选择对应数据库内置实现</li></ul> <p>实现 <code>IDbQuery</code> 接口自定义数据库查询 <code>SQL 语句</code> 定制化返回自己需要的内容</p> <h3 id="dbtype"><a href="#dbtype" class="header-anchor">#</a> dbType</h3> <ul><li>数据库类型</li> <li>该类内置了常用的数据库类型【必须】</li></ul> <h3 id="schemaname"><a href="#schemaname" class="header-anchor">#</a> schemaName</h3> <ul><li>数据库 schema name</li> <li>例如 <code>PostgreSQL</code> 可指定为 <code>public</code></li></ul> <h3 id="typeconvert"><a href="#typeconvert" class="header-anchor">#</a> typeConvert</h3> <ul><li>类型转换</li> <li>默认由 <code>dbType</code> 类型决定选择对应数据库内置实现</li></ul> <p>实现 <code>ITypeConvert</code> 接口自定义数据库 <code>字段类型</code> 转换为自己需要的 <code>java</code> 类型，内置转换类型无法满足可实现 <code>IColumnType</code> 接口自定义</p> <h3 id="url"><a href="#url" class="header-anchor">#</a> url</h3> <ul><li>驱动连接的 URL</li></ul> <h3 id="drivername"><a href="#drivername" class="header-anchor">#</a> driverName</h3> <ul><li>驱动名称</li></ul> <h3 id="username"><a href="#username" class="header-anchor">#</a> username</h3> <ul><li>数据库连接用户名</li></ul> <h3 id="password"><a href="#password" class="header-anchor">#</a> password</h3> <ul><li>数据库连接密码</li></ul> <h2 id="数据库表配置"><a href="#数据库表配置" class="header-anchor">#</a> 数据库表配置</h2> <h3 id="iscapitalmode"><a href="#iscapitalmode" class="header-anchor">#</a> isCapitalMode</h3> <p>是否大写命名</p> <h3 id="skipview"><a href="#skipview" class="header-anchor">#</a> skipView</h3> <p>是否跳过视图</p> <h3 id="naming"><a href="#naming" class="header-anchor">#</a> naming</h3> <p>数据库表映射到实体的命名策略</p> <h3 id="columnnaming"><a href="#columnnaming" class="header-anchor">#</a> columnNaming</h3> <p>数据库表字段映射到实体的命名策略, 未指定按照 naming 执行</p> <h3 id="tableprefix"><a href="#tableprefix" class="header-anchor">#</a> tablePrefix</h3> <p>表前缀</p> <h3 id="fieldprefix"><a href="#fieldprefix" class="header-anchor">#</a> fieldPrefix</h3> <p>字段前缀</p> <h3 id="superentityclass"><a href="#superentityclass" class="header-anchor">#</a> superEntityClass</h3> <p>自定义继承的 Entity 类全称，带包名</p> <h3 id="superentitycolumns"><a href="#superentitycolumns" class="header-anchor">#</a> superEntityColumns</h3> <p>自定义基础的 Entity 类，公共字段</p> <h3 id="supermapperclass"><a href="#supermapperclass" class="header-anchor">#</a> superMapperClass</h3> <p>自定义继承的 Mapper 类全称，带包名</p> <h3 id="superserviceclass"><a href="#superserviceclass" class="header-anchor">#</a> superServiceClass</h3> <p>自定义继承的 Service 类全称，带包名</p> <h3 id="superserviceimplclass"><a href="#superserviceimplclass" class="header-anchor">#</a> superServiceImplClass</h3> <p>自定义继承的 ServiceImpl 类全称，带包名</p> <h3 id="supercontrollerclass"><a href="#supercontrollerclass" class="header-anchor">#</a> superControllerClass</h3> <p>自定义继承的 Controller 类全称，带包名</p> <h3 id="enablesqlfilter-since-3-3-1"><a href="#enablesqlfilter-since-3-3-1" class="header-anchor">#</a> enableSqlFilter（since 3.3.1）</h3> <p>默认激活进行 sql 模糊表名匹配</p> <p>关闭之后 likeTable 与 notLikeTable 将失效，include 和 exclude 将使用内存过滤</p> <p>如果有 sql 语法兼容性问题的话，请手动设置为 false</p> <p>已知无法使用：MyCat 中间件， <a href="https://github.com/baomidou/mybatis-plus/issues/2102" target="_blank" rel="noopener noreferrer">支持情况传送门<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <h3 id="include"><a href="#include" class="header-anchor">#</a> include</h3> <p>需要包含的表名，当 enableSqlFilter 为 false 时，允许正则表达式（与 exclude 二选一配置）</p> <h3 id="liketable"><a href="#liketable" class="header-anchor">#</a> likeTable</h3> <p>自 3.3.0 起，模糊匹配表名（与 notLikeTable 二选一配置）</p> <h3 id="exclude"><a href="#exclude" class="header-anchor">#</a> exclude</h3> <p>需要排除的表名，当 enableSqlFilter 为 false 时，允许正则表达式</p> <h3 id="notliketable"><a href="#notliketable" class="header-anchor">#</a> notLikeTable</h3> <p>自 3.3.0 起，模糊排除表名</p> <h3 id="entitycolumnconstant"><a href="#entitycolumnconstant" class="header-anchor">#</a> entityColumnConstant</h3> <p>【实体】是否生成字段常量（默认 false）</p> <h3 id="entitybuildermodel"><a href="#entitybuildermodel" class="header-anchor">#</a> <s>entityBuilderModel</s></h3> <p>【实体】是否为构建者模型（默认 false），自 3.3.2 开始更名为 <a href="#chainmodel%EF%BC%88since-3-3-2%EF%BC%89">chainModel</a></p> <h3 id="chainmodel-since-3-3-2"><a href="#chainmodel-since-3-3-2" class="header-anchor">#</a> chainModel（since 3.3.2）</h3> <p>【实体】是否为链式模型（默认 false）</p> <h3 id="entitylombokmodel"><a href="#entitylombokmodel" class="header-anchor">#</a> entityLombokModel</h3> <p>【实体】是否为 lombok 模型（默认 false）</p> <p>3.3.2 以下版本默认生成了链式模型，3.3.2 以后，默认不生成，如有需要，请开启 <a href="#chainmodel%EF%BC%88since-3-3-2%EF%BC%89">chainModel</a></p> <h3 id="entitybooleancolumnremoveisprefix"><a href="#entitybooleancolumnremoveisprefix" class="header-anchor">#</a> entityBooleanColumnRemoveIsPrefix</h3> <p>Boolean 类型字段是否移除 is 前缀（默认 false）</p> <h3 id="restcontrollerstyle"><a href="#restcontrollerstyle" class="header-anchor">#</a> restControllerStyle</h3> <p>生成 <code>@RestController</code> 控制器</p> <h3 id="controllermappinghyphenstyle"><a href="#controllermappinghyphenstyle" class="header-anchor">#</a> controllerMappingHyphenStyle</h3> <p>驼峰转连字符</p> <h3 id="entitytablefieldannotationenable"><a href="#entitytablefieldannotationenable" class="header-anchor">#</a> entityTableFieldAnnotationEnable</h3> <p>是否生成实体时，生成字段注解</p> <h3 id="versionfieldname"><a href="#versionfieldname" class="header-anchor">#</a> versionFieldName</h3> <p>乐观锁属性名称</p> <h3 id="logicdeletefieldname"><a href="#logicdeletefieldname" class="header-anchor">#</a> logicDeleteFieldName</h3> <p>逻辑删除属性名称</p> <h3 id="tablefilllist"><a href="#tablefilllist" class="header-anchor">#</a> tableFillList</h3> <p>表填充字段</p> <h2 id="包名配置"><a href="#包名配置" class="header-anchor">#</a> 包名配置</h2> <h3 id="parent"><a href="#parent" class="header-anchor">#</a> parent</h3> <p>父包名。如果为空，将下面子包名必须写全部， 否则就只需写子包名</p> <h3 id="modulename"><a href="#modulename" class="header-anchor">#</a> moduleName</h3> <p>父包模块名</p> <h3 id="entity"><a href="#entity" class="header-anchor">#</a> entity</h3> <p>Entity 包名</p> <h3 id="service"><a href="#service" class="header-anchor">#</a> service</h3> <p>Service 包名</p> <h3 id="serviceimpl"><a href="#serviceimpl" class="header-anchor">#</a> serviceImpl</h3> <p>Service Impl 包名</p> <h3 id="mapper"><a href="#mapper" class="header-anchor">#</a> mapper</h3> <p>Mapper 包名</p> <h3 id="xml"><a href="#xml" class="header-anchor">#</a> xml</h3> <p>Mapper XML 包名</p> <h3 id="controller"><a href="#controller" class="header-anchor">#</a> controller</h3> <p>Controller 包名</p> <h3 id="pathinfo"><a href="#pathinfo" class="header-anchor">#</a> pathInfo</h3> <p>路径配置信息</p> <h2 id="模板配置"><a href="#模板配置" class="header-anchor">#</a> 模板配置</h2> <h3 id="entity-2"><a href="#entity-2" class="header-anchor">#</a> entity</h3> <p>Java 实体类模板</p> <h3 id="entitykt"><a href="#entitykt" class="header-anchor">#</a> entityKt</h3> <p>Kotin 实体类模板</p> <h3 id="service-2"><a href="#service-2" class="header-anchor">#</a> service</h3> <p>Service 类模板</p> <h3 id="serviceimpl-2"><a href="#serviceimpl-2" class="header-anchor">#</a> serviceImpl</h3> <p>Service impl 实现类模板</p> <h3 id="mapper-2"><a href="#mapper-2" class="header-anchor">#</a> mapper</h3> <p>mapper 模板</p> <h3 id="xml-2"><a href="#xml-2" class="header-anchor">#</a> xml</h3> <p>mapper xml 模板</p> <h3 id="controller-2"><a href="#controller-2" class="header-anchor">#</a> controller</h3> <p>controller 控制器模板</p> <h2 id="全局策略-globalconfig-配置"><a href="#全局策略-globalconfig-配置" class="header-anchor">#</a> 全局策略 <code>globalConfig</code> 配置</h2> <h3 id="outputdir"><a href="#outputdir" class="header-anchor">#</a> outputDir</h3> <ul><li>生成文件的输出目录</li> <li>默认值：<code>D 盘根目录</code></li></ul> <h3 id="fileoverride"><a href="#fileoverride" class="header-anchor">#</a> fileOverride</h3> <ul><li>是否覆盖已有文件</li> <li>默认值：<code>false</code></li></ul> <h3 id="open"><a href="#open" class="header-anchor">#</a> open</h3> <ul><li>是否打开输出目录</li> <li>默认值：<code>true</code></li></ul> <h3 id="enablecache"><a href="#enablecache" class="header-anchor">#</a> enableCache</h3> <ul><li>是否在 xml 中添加二级缓存配置</li> <li>默认值：`false</li></ul> <h3 id="author"><a href="#author" class="header-anchor">#</a> author</h3> <ul><li>开发人员</li> <li>默认值：<code>null</code></li></ul> <h3 id="kotlin"><a href="#kotlin" class="header-anchor">#</a> kotlin</h3> <ul><li>开启 Kotlin 模式</li> <li>默认值：<code>false</code></li></ul> <h3 id="swagger2"><a href="#swagger2" class="header-anchor">#</a> swagger2</h3> <ul><li>开启 swagger2 模式</li> <li>默认值：<code>false</code></li></ul> <h3 id="activerecord"><a href="#activerecord" class="header-anchor">#</a> activeRecord</h3> <ul><li>开启 ActiveRecord 模式</li> <li>默认值：<code>false</code></li></ul> <h3 id="baseresultmap"><a href="#baseresultmap" class="header-anchor">#</a> baseResultMap</h3> <ul><li>开启 BaseResultMap</li> <li>默认值：<code>false</code></li></ul> <h3 id="basecolumnlist"><a href="#basecolumnlist" class="header-anchor">#</a> baseColumnList</h3> <ul><li>开启 baseColumnList</li> <li>默认值：<code>false</code></li></ul> <h3 id="datetype"><a href="#datetype" class="header-anchor">#</a> dateType</h3> <ul><li>时间类型对应策略</li> <li>默认值：<code>TIME_PACK</code></li></ul> <div class="custom-block warning"><p class="custom-block-title">注意事项:</p> <p>如下配置 <code>%s</code> 为占位符</p></div> <h3 id="entityname"><a href="#entityname" class="header-anchor">#</a> entityName</h3> <ul><li>实体命名方式</li> <li>默认值：<code>null</code>
例如：<code>%sEntity</code> 生成 <code>UserEntity</code></li></ul> <h3 id="mappername"><a href="#mappername" class="header-anchor">#</a> mapperName</h3> <ul><li>mapper 命名方式</li> <li>默认值：<code>null</code>
例如：<code>%sDao</code> 生成 <code>UserDao</code></li></ul> <h3 id="xmlname"><a href="#xmlname" class="header-anchor">#</a> xmlName</h3> <ul><li>Mapper xml 命名方式</li> <li>默认值：<code>null</code>
例如：<code>%sDao</code> 生成 <code>UserDao.xml</code></li></ul> <h3 id="servicename"><a href="#servicename" class="header-anchor">#</a> serviceName</h3> <ul><li>service 命名方式</li> <li>默认值：<code>null</code>
例如：<code>%sBusiness</code> 生成 <code>UserBusiness</code></li></ul> <h3 id="serviceimplname"><a href="#serviceimplname" class="header-anchor">#</a> serviceImplName</h3> <ul><li>service impl 命名方式</li> <li>默认值：<code>null</code>
例如：<code>%sBusinessImpl</code> 生成 <code>UserBusinessImpl</code></li></ul> <h3 id="controllername"><a href="#controllername" class="header-anchor">#</a> controllerName</h3> <ul><li>controller 命名方式</li> <li>默认值：<code>null</code>
例如：<code>%sAction</code> 生成 <code>UserAction</code></li></ul> <h3 id="idtype"><a href="#idtype" class="header-anchor">#</a> idType</h3> <ul><li>指定生成的主键的 ID 类型</li> <li>默认值：<code>null</code></li></ul> <h2 id="注入-injectionconfig-配置"><a href="#注入-injectionconfig-配置" class="header-anchor">#</a> 注入 <code>injectionConfig</code> 配置</h2> <h3 id="map"><a href="#map" class="header-anchor">#</a> map</h3> <ul><li>自定义返回配置 Map 对象</li> <li>该对象可以传递到模板引擎通过 <code>cfg.xxx</code> 引用</li></ul> <h3 id="fileoutconfiglist"><a href="#fileoutconfiglist" class="header-anchor">#</a> fileOutConfigList</h3> <ul><li>自定义输出文件</li> <li>配置 <code>FileOutConfig</code> 指定模板文件、输出文件达到自定义文件生成目的</li></ul> <h3 id="filecreate"><a href="#filecreate" class="header-anchor">#</a> fileCreate</h3> <ul><li>自定义判断是否创建文件</li> <li>实现 <code>IFileCreate</code> 接口</li></ul> <p>该配置用于判断某个类是否需要覆盖创建，当然你可以自己实现差异算法 <code>merge</code> 文件</p> <h3 id="initmap"><a href="#initmap" class="header-anchor">#</a> initMap</h3> <ul><li>注入自定义 Map 对象(注意需要 setMap 放进去)</li></ul></div></div>  <div class="page-edit"><div class="edit-link"><a href="https://github.com/baomidou/mybatis-plus/edit/master/docs/02.配置/02.代码生成器配置/02.代码生成器配置旧.md" target="_blank" rel="noopener noreferrer">编辑</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----> <!----></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/pages/981406/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">代码生成器配置新</div></a> <!----></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/pages/981406/" class="prev">代码生成器配置新</a></span> <!----></p></div></div></div> <!----></main></div> <div class="footer"><div class="icons"><a href="https://github.com/baomidou" title="GitHub" target="_blank" class="iconfont icon-github"></a><a href="https://gitee.com/baomidou" title="Gitee" target="_blank" class="iconfont icon-gitee"></a><a href="mailto:koyangslash@gmail.com" title="发邮件" target="_blank" class="iconfont icon-youjian"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2016-2021
    <span><a href="http://baomidou.com" target="_blank" style="font-weight:bold">Team Baomidou</a> | Sponsored by <a href="https://www.jetbrains.com" target="_blank" style="font-weight:bold">JetBrains</a> | <a href="http://beian.miit.gov.cn/" target=_blank>渝ICP备2021000141号</a><p>友情链接：<a href="http://aizuda.com" target="_blank" style="font-weight:bold">AiZuDa</a> | <a href="https://dyang.top/" target="_blank" style="font-weight:bold">D.Yang</a> | <a href="https://blog.nancheung.com/" target="_blank" style="font-weight:bold">NanCheung</a></p></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.3c810432.js" defer></script><script src="/assets/js/2.86379151.js" defer></script><script src="/assets/js/12.4e438e6d.js" defer></script>
  </body>
</html>